import{createStore} from 'vuex'
import service from "@/components/request/request";

export default createStore({
    state:{
        playList:[{
            al:{
                "id": 2732645,
                "name": "Eason's Life 陈奕迅2013演唱会",
                "picUrl": "https://p1.music.126.net/rYXihk9-kGWijs5vJpm0iw==/5772436045948506.jpg",
                "tns": [],
                "pic": 5772436045948506
            },
            ar: {
                    "id": 48432,
                    "name": "陈奕迅",
                    "tns": [],
                    "alias": []
                },
            id:28160881
        }],
        playIndex:0,
        isPlayed: false,//是否在播放
        detailShow: false, //详情页展示
        lyric: {}, //歌词
        currentTime: 0, //当前播放时间
        duration: 0, //歌曲时长
        footerShow: false, //底部组件是否展示
    },
    mutations:{
        UPDATE(state,value){
             state.isPlayed=value
        },
        LIST(state,value){
             state.playList=value
        },
        //修改当前播放歌曲
        INDEX(state,value){
             state.playIndex=value
        },
        SHOW(state,value){
            state.detailShow=!state.detailShow
        },
        LYRIC(state,value){
            state.lyric=value
        }
    },
    modules:{

    }
})
